namespace Framework
{
    public class ExecuteActionable<T> : Behavior<T>
    {
        private IBTreeActionable<T> _actionable;

        public ExecuteActionable(IBTreeActionable<T> actionable)
        {
            _actionable = actionable;
        }

        public override void OnStart(T context)
        {
            base.OnStart(context);
            _actionable.OnStart(context);
        }

        public override void OnEnd(T context)
        {
            base.OnEnd(context);
            _actionable.OnEnd(context);
        }

        public override TaskStatus Update(T context)
        {
            return _actionable.Update(context);
        }
    }
}